cc.exports.GamePath		= "app.part.ddz";
-- 初始化公共层
require(GamePath .. ".frameworks.init");
-- 清除缓存
CleanUtils.clean(GamePath);

-- 初始化全局变量
cc.exports.SingleGame 	= false; -- 是否单品游戏
cc.exports.DEBUG_GAME 	= true;

cc.exports.DdzGameData 	= require(GamePath .. ".config.ddzgamedata");
-- 加载斗地主类库
require(GamePath .. ".config.ddzloadpackage");


local app_base = GamePath .. ".components.";
-- 斗地主组件配置，设计全局是为了在退出子游戏大厅时释放资源
local ddz_part_config = {
	-- game hall layers
	LobbyPart 				= app_base .. "lobby.lobby.lobbypart",
	EnterRoomPart 			= app_base .. "lobby.enterroom.enterroompart",
	CreateRoomPart 			= app_base .. "lobby.createroom.createroompart",
	DdzNoticePart 			= app_base .. "lobby.notice.noticepart",
    RecordPart              = app_base .. "lobby.record.recordpart",
	DdzHelpLayerPart        = app_base .. "lobby.help.helplayerpart",
	PurchasePart 			= app_base .. "lobby.purchase.purchasepart",
	PayWayDialogPart 		= app_base .. "lobby.paywaydialog.paywaydialogpart",
	WebViewPart 			= app_base .. "lobby.webview.webviewpart",
	-- all game layers
	TablePart 				= app_base .. "table.tablepart",
	BgLayerPart				= app_base .. "table.bglayerpart",
	GameLayerPart			= app_base .. "table.gamelayerpart",
	EffectLayerPart			= app_base .. "table.effectlayerpart",
	PopupLayerPart			= app_base .. "table.popuplayerpart",
	SystemPopupLayerPart	= app_base .. "table.systempopuplayerpart",
	-- background layer
	DesktopLayerPart 		= app_base .. "bglayer.desktop.desktoplayerpart",
	SysInfoPart             = app_base .. "bglayer.sysinfo.sysinfopart",
    WifiAndNetPart          = app_base .. "bglayer.wifiandnet.wifiandnetpart",
	-- effect layer 
	FlyScorePart 			= app_base .. "effectlayer.flyscore.flyscorepart",
	GameEffectPart			= app_base .. "effectlayer.gameeffect.gameeffectpart",

};
-- 覆盖合集大厅PartConfig
if PartConfig then 
	for i,v in pairs(ddz_part_config) do
		PartConfig.part[i] = v
	end
else 
	cc.exports.PartConfig = {};
end
